Home
PHP
Tags
PHP Tutorial
Latest Articles
English
English
简体中文
中文(繁體)
日本語
한국어
Français
Deutsch
မြန်မာဘာသာ
Current Location:
Home
>
Function Categories
>
date_sub
date_sub
DateTime::sub - Subtract a certain amount of days, months, years, hours, minutes, and seconds to a DateTime object
Name:
date_sub
Category:
Date and time
Programming Language:
php
One-line Description:
Subtract the day, month, year, hour, minute, and second from the specified date.
Related
Use date_sub function to subtract weekdays: How to avoid weekends
2
What Are the Differences Between date_sub and date_add Functions? How to Use Them Together?
3
Frequently Asked Questions about the date_sub function when handling time zones
2
date_sub function: How to subtract a specified time from the current date
9
Similar Functions
timezone_offset_get
timezone_offset_get
AliasforDateTimeZo
checkdate
checkdate
VerifytheGregorianca
date_time_set
date_time_set
DateTime::setTimeali
strtotime
strtotime
ParsesanyEnglishtext
date_create_from_format
date_create_from_format
AliasforDateTime::
date_diff
date_diff
AliasforDateTime::
date_default_timezone_set
date_default_timezone_set
Setthedefaulttimezon
date_create_immutable
date_create_immutable
DateTimeImmutable::_
Popular Articles
date_sub function: How to subtract a specified time from the current date
Frequently Asked Questions about the date_sub function when handling time zones
What Are the Differences Between date_sub and date_add Functions? How to Use Them Together?
Use date_sub function to subtract weekdays: How to avoid weekends